<table class="table">
  <thead>
    <tr>
      <th>Name</th>
      <th>Code</th>
      <th>Sup</th>
      <th>Subs count</th>
      <th>Records count</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @data_types.each do |data_type| %>
      <tr>
        <td><%= data_type.name %></td>
        <td><%= data_type.code %></td>
        <td><%= data_type.sup %></td>
        <td><%= data_type.subs_count %></td>
        <td><%= data_type.records_count %></td>
        <td><%= link_to '查看', data_type %></td>
        <td><%= link_to '编辑', edit_data_type_path(data_type) %></td>
        <td><%= link_to '删除', data_type, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Data type', new_data_type_path %>
